<?php
/**
 * ScrollBar Plugin For Z-Blog
 * 
 * @package     ScrollBar.zba
 * @version     1.0.1
 * @author      Wildlife <admin@lanseyujie.com>
 * @link        https://lanseyujie.com
 * @license     https://opensource.org/licenses/mit-license.php MIT
 * @copyright   Copyright(c) 2014-2018, lanseyujie.com
 */

RegisterPlugin('ScrollBar', 'ActivePlugin_ScrollBar');

function ActivePlugin_ScrollBar() {
	Add_Filter_Plugin('Filter_Plugin_Zbp_MakeTemplatetags', 'ScrollBar_Action');
}
function InstallPlugin_ScrollBar() {
	global $zbp;
	$zbp->SetHint('good', '插件滚动条启用成功！感谢您的使用！');
}
function ScrollBar_Action(&$template) {
	global $zbp;
	$zbp->header .= '<link rel="stylesheet" href="'. $zbp->host .'zb_users/plugin/ScrollBar/src/css/style.css" type="text/css" /><script type="text/javascript" src="'. $zbp->host .'zb_users/plugin/ScrollBar/src/js/script.js"></script>';
	$zbp->footer .= '<div id="scroll" style="top: 0px; display: none;">(0%)</div><div class="go-up" style="display: none;"><span><img src="" /></span></div>';
}
function UninstallPlugin_ScrollBar() {
	global $zbp;
	$zbp->SetHint('good', '您已成功卸载滚动条插件！后会有期！');
}